package com.ks.service;

import com.ks.pojo.Product;
import com.ks.service.impl.OrderServiceFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "product-service",fallback = OrderServiceFeignFallback.class)
public interface OrderService {

    @GetMapping("/product/findAll")
    public List<Product> orderInfo();

    @GetMapping("/product/get/{id}")
    public Product orderp(@PathVariable("id") String id);//fiegn，传递get参数，这里要把参数也写过去，参考productController来写应该就可以了。
}
